﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Axe
{
    public sealed class TypeChecker<T> 
    {
        Type checkingType = typeof(T);

        public bool Match<Target>()
        {
            return checkingType == typeof(Target);
        }

        public bool Match(Type type)
        {
            return checkingType == type;
        }

        public bool IsImplements<T1>() 
        {
            Type target = typeof(T1);
            return target.IsAssignableFrom(checkingType);
        }
    }
}
